package com.class5.springboot.frame.repo.real.init;

import javax.annotation.PostConstruct;

import com.class5.springboot.frame.repo.INormalRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;


@Component
public class DbCenterInit {
    @Autowired
    @Lazy
    private INormalRepository repo;

    @PostConstruct
    public void init() {
        repo.initSchema(this.getClass().getResourceAsStream("/db/tb_xt_file.xml"));
        repo.initSchema(this.getClass().getResourceAsStream("/db/org_user.xml"));
        repo.initSchema(this.getClass().getResourceAsStream("/db/log_model.xml"));
        repo.initSchema(this.getClass().getResourceAsStream("/db/sys_init.xml"));
        repo.initSchema(this.getClass().getResourceAsStream("/db/asset_init.xml"));
    }
}
